<%@page pageEncoding="UTF-8" contentType="text/html; charset=UTF-8" import="java.util.*"%>
<%@page import="com.yeepay.mp.daemon.AuthUserDeamon"%>
<%@page import="org.springframework.web.context.support.WebApplicationContextUtils"%>
<%@page import="org.springframework.context.ApplicationContext"%>

<html>
	<head>
		<link href="css/main.css" rel="stylesheet" type="text/css">
		<link href="css/style1.css" rel="stylesheet" type="text/css" />
		<link href="css/default.css" rel="stylesheet" type="text/css" />
		<title>用户认证</title>
	</head>
	<body>
		<h2>用户认证</h2>

<%	
	String referer = (String)request.getHeader("Referer");
	if(referer != null 
			&&referer.endsWith("authUser.jsp")){
		try{
			ServletContext servletContext = getServletContext();
			ApplicationContext ctx = WebApplicationContextUtils.getWebApplicationContext(servletContext);	
			AuthUserDeamon daemon = (AuthUserDeamon)ctx.getBean("authUserDeamon");
			daemon.execute();
%>
		<font color="red">认证完成!</font>
<%
		}catch(Exception e){
			e.printStackTrace();
		}
		
	}
%>
		<form action="authUser.jsp">
			<input type="submit" value="提交"/>
		</form>
</body>
</html>
